package com.lc.model;

import java.io.Serializable;
import java.util.Date;

/**
 * @author DELL
 * @date 2021/12/20 23:26
 */
public class Blah implements Serializable {
    private String username;
    private Date date;
    private String txt;

    public Blah() {
    }

    public Blah(String username, Date date, String txt) {
        this.username = username;
        this.date = date;
        this.txt = txt;
    }

    public String getUsername() {
        return username;
    }

    public Date getDate() {
        return date;
    }

    public String getTxt() {
        return txt;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public void setTxt(String txt) {
        this.txt = txt;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((date == null) ? 0 : date.hashCode());
        result = prime * result + ((username == null) ? 0 : username.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        Blah other = (Blah) obj;
        if (date == null) {
            if (other.date != null) {
                return false;
            }
        } else if (!date.equals(other.date)) {
            return false;
        }
        if (username == null) {
            if (other.username != null) {
                return false;
            } else if (!username.equals(other.username)) {
                return false;
            }
        }
        return true;
    }
}
